package J1_13;

import java.util.Scanner;

public class J113task1 {
    public static void main(String[] args) {
        int n;
        Scanner scanner =new Scanner(System.in);
        System.out.printf("输入矩形长度:");
        n=scanner.nextInt();
        for (int i=0;i<n;i++){
          if (i==0||i==n-1){
              for (int j=0;j<n;j++){
                  System.out.printf("*");
              }

          }
          else {
              for (int j=n-1;j>=0;j--){
                  if (j==0||j==n-1){
                      System.out.printf("*");
                  }
                  else System.out.printf(" ");
              }
          }
            System.out.println();
        }
    }
}
